package csel.model.skills;

import csel.model.Impactor;
import csel.model.Projectile;
import csel.model.Tile;
import csel.model.entity.Entity;

public class FireBallImpactor implements Impactor
{
	FireBall f;
	Projectile p;

	public FireBallImpactor(FireBall f)
	{
		this.f = f;
	}

	@Override
	public void attach(Projectile p)
	{
		this.p = p;
	}

	@Override
	public boolean impact(Tile t)
	{
		Entity e = t.getEntity();
		if(e!=null)
		{
			f.use(e);
			return(false);
		}
		return(true);
	}

}
